package com.beta.elephant.vo;

import com.alibaba.fastjson.JSONObject;
import com.beta.elephant.constant.CommEnumMgr;

import java.io.Serializable;

/**
 * @Description 基础流水日志
 * @Author lixin
 **/

public class BaseFlow<T> implements Serializable {
    private CommEnumMgr.Project project;
    private CommEnumMgr.Scene scene;
    private Long gameId;
    private Long userId;
    private T data;

    public CommEnumMgr.Project getProject() {
        return project;
    }

    public void setProject(CommEnumMgr.Project project) {
        this.project = project;
    }

    public CommEnumMgr.Scene getScene() {
        return scene;
    }

    public void setScene(CommEnumMgr.Scene scene) {
        this.scene = scene;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public Long getGameId() {
        return gameId;
    }

    public void setGameId(Long gameId) {
        this.gameId = gameId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("Project:").append(getProject().name()).append(", Scene:")
                .append(getScene().name()).append(", gameId:").append(getGameId())
                .append(", userId:").append(getUserId()).append(", data:").append(JSONObject.toJSONString(getData()));
        return builder.toString();
    }
}
